package com.cc.spring.resp;

// 用于返回给前端的返回信息
public class HdfsFileStatus {
    private boolean isExists;//是否存在
    private String path; // 文件路径
    private boolean isDirectory; // 是否是文件夹
    private String fileName; // 文件名
    private Integer replication = 3; // 被分数
    private Long fileSize; // 文件大小
    private Long blockSize; // 块大小
//    private Long modifyTime; // 修改的时间
//
    public HdfsFileStatus(){
//        初始化默认存在
        this.isExists = true;
    }
    public HdfsFileStatus(Boolean isFile){
        this.isExists = isFile;
    }
    public HdfsFileStatus(boolean isExists, String path, boolean isDirectory, String name, Integer replication, Long fileSize, Long blockSize) {
        this.isExists = isExists;
        this.path = path;
        this.isDirectory = isDirectory;
        this.fileName = name;
        this.replication = replication;
        this.fileSize = fileSize;
        this.blockSize = blockSize;
    }

    public boolean isExists() {
        return isExists;
    }

    public void setExists(boolean exists) {
        isExists = exists;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public boolean isDirectory() {
        return isDirectory;
    }

    public void setDirectory(boolean directory) {
        isDirectory = directory;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String name) {
        this.fileName = name;
    }

    public Integer getReplication() {
        return replication;
    }

    public void setReplication(Integer replication) {
        this.replication = replication;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    public Long getBlockSize() {
        return blockSize;
    }

    public void setBlockSize(Long blockSize) {
        this.blockSize = blockSize;
    }

    @Override
    public String toString() {
        return "HdfsFileStatus{" +
                "isExists=" + isExists +
                ", path='" + path + '\'' +
                ", isDirectory=" + isDirectory +
                ", name='" + fileName + '\'' +
                ", replication=" + replication +
                ", fileSize=" + fileSize +
                ", blockSize=" + blockSize +
                '}';
    }
}
